Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support bytes array argument in solidity and vyper contracts #2255

Conversation

bitwise-constructs
Copy link
Contributor

What I did

Added support for bytes array argument in solidity and vyper contracts

How I did it

Added a value converter for a list of hex values to a single concatenated hex value

How to verify it

tx = contract_instance.functionWithCalldata(["0x123456", "0xabcd"], sender=owner)
for
functionWithCalldata(bytes calldata data)

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

fubuloubu
fubuloubu previously approved these changes Aug 30, 2024
src/ape/managers/converters.py Outdated Show resolved Hide resolved
Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
antazoey
antazoey previously approved these changes Aug 30, 2024
Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lemme know if you need help with failing tests - those should probably be less affected by changes if you want to genericize them more

src/ape/managers/converters.py Outdated Show resolved Hide resolved
antazoey
antazoey previously approved these changes Aug 30, 2024
Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a tuple of nits but looks good

(joke by @bitwise-constructs )

src/ape/managers/converters.py Outdated Show resolved Hide resolved
tests/functional/test_contract_instance.py Show resolved Hide resolved
antazoey
antazoey previously approved these changes Sep 3, 2024
Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bitwise-constructs bitwise-constructs enabled auto-merge (squash) September 3, 2024 19:24
@bitwise-constructs bitwise-constructs enabled auto-merge (squash) September 3, 2024 19:29
@bitwise-constructs bitwise-constructs merged commit d97fff0 into ApeWorX:main Sep 3, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants